package biz.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import dao.RecycleDao;
import entity.Announce;
import entity.Files;
import entity.Recycle;
import biz.RecycleBiz;

public class RecycleBizImpl implements RecycleBiz {
	private RecycleDao recycleDao;
	
	public RecycleDao getRecycleDao() {
		return recycleDao;
	}

	public void setRecycleDao(RecycleDao recycleDao) {
		this.recycleDao = recycleDao;
	}
	public Integer count() {
		return recycleDao.count();
	}

	public List<Files> findByPage(Integer pageNo, Integer rows) {
		Map map = new HashMap();
		map.put("start", (pageNo-1)*rows+1);
		map.put("end", pageNo*rows);
		return recycleDao.findByPage(map);
	}

	public Files findById(Integer id) {
		return recycleDao.findById(id);
	}

	public int delete(Files files) {
		return recycleDao.delete(files);
	}

	public int update(Files files) {
		return recycleDao.updateStatus(files);
	}

	public int updateStatus(Files files) {
		return recycleDao.updateStatus(files);
	}

	public List<Files> findAll() {
		return null;
	}

	


	
	
}
